/**
 * Created by zhangwenlei on 2017/5/23.
 */
BCP.bill.domControl.Listbasedata=function(parent){
    BCP.bill.domControl.Listbasedata.superclass.constructor.call(this,parent);
};

COM.util.defineClass(BCP.bill.domControl.Listbasedata,ADF.domControl.BaseControl, {
    getLabel: function(){
        return "Listbasedata";
    },
    setInitData:function(data){
        //TODO ��������չʾ��������
        $(this.getDomElement()).val(data);
    },
    setProvider : function(value){
        $(this.getDomElement()).attr('provider', value);
    },
    setBinding:function (binding) {
        if(binding){
            $(this.domElement).attr("connection_field",binding);
        }else{
            $(this.domElement).removeAttr("connection_field");
        }
    },
    _getDomElement: function(model) {
        var listbasedata = COM.util.HTMLUtil.createELement('<input type="text"/>');
        if(model.getBinding()){
           $(listbasedata).attr("connection_field",model.getBinding());
       }
        return listbasedata[0];
    }
});